﻿namespace Jim.OA;

/// <summary>
/// 流程当前操作人可以保存意见
/// </summary>
[Sdk("/api/workflow/paService/saveRequestLog",description: "流程当前操作人可以保存意见")]
public class OASaveLogRequestInput : OAUserRequest<SdkResponse>, ISdkCustomDic
{
    [Required(ErrorMessage = "流程ID不能为空")]
    public string RequestId { get; set; }
    /// <summary>
    /// 意见内容
    /// </summary>
    public string Remark { get; set; }
    public string SignDocIds { get; set; }
    public string SignWorkflowIds { get; set; }
    public string AnnexDocIds { get; set; }

    public SdkDictionary Dic()
    {
        SdkDictionary dic = new SdkDictionary();
        dic.Add("requestId", RequestId);
        dynamic otherParams = new ExpandoObject();
        if (!string.IsNullOrEmpty(AnnexDocIds)) otherParams.annexdocids = AnnexDocIds;
        if (!string.IsNullOrEmpty(SignWorkflowIds)) otherParams.signworkflowids = SignWorkflowIds;
        if (!string.IsNullOrEmpty(SignDocIds)) otherParams.signdocids = SignDocIds;
        dic.Add("otherParams", otherParams);
        dic.Add("remark", Remark);
        return dic;
    }
}